e
#Title[u\F̗ցv]
#Text[XsEUEȂƂ
u\F̗ցv]
#BackGround[User]
#BGM[.\..\bgm\bgm.wav]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
	
	////////////////////////////////////////////////////////////////////////
	//                                                          //
	//   e摜̕ύX                                                     //
	//   xʂ炵A~𒷂                           //
	////////////////////////////////////////////////////////////////////////
	
	@Initialize{
		InitializeData();
		
		LoadUserShotData(shot_ryoyan);
		
		SetLife(1000);
		SetMovePosition03(GetCenterX(),GetCenterY(),10,8);
		SetDamageRate(22,16);
		SetInvincibility(240);
		SetCollisionEx(32,16);
		SetEnemyMarker(true);
		
		TMain();
	}
	
	@MainLoop{
		yield;
	}
	
	@DrawLoop{
		DrawBoss(imgBoss);
	}
	
	@Finalize{
		FinalizeData();
	}
	
	task TMain(){
		wait(60);
		
		DeclareSpell();
		
		Atack();
		Move();
	}
	
	function DeclareSpell(){
		SetTimer(90);
		CutIn(YOUMU,"u\F̗ցv",NULL,0,0,0,0);
		SetScore(1000000);
		wait(180);
	}
	
	task Atack(){
		let count=0;
		let color=[_RED03(),_GREEN03(),_BLUE03()];
		
		loop{
			let ang=rand(0,360);
			loop(4){
				ang += 30;
				
				ascent(cnt in 0..12){
					CreateShotA(0,GetX(),GetY(),0);
					SetShotDataA(0,0,4.5,ang+cnt*30,p1m0(count/4),-0.048,0,color[(trunc(cnt/4))%3]);
					SetShotDataA(0,80+40-count%4*10,0,ang+cnt*30+p1m0(count/4)*90,p1m0(count/4)*0.7,0.04,2,NULL);
					SetShotDirectionType(SEQUENCE);
					SetShotDataA(0,160+40-count%4*10,NULL,(count%4-1.5)*15,0,0.01,2,NULL);
					SetShotDirectionType(ABSOLUTE);
					FireShot(0);
				}
				wait(12);
				count++;
			}
			wait(12 * 3 + 5 +(count%12==0)*80);
		}
	}
	
	task Move(){
	}
	
	#include_function ".\..\functions\initialize.txt"
	#include_function ".\..\functions\color_set.txt"
	#include_function ".\..\functions\function.txt"
}
